calculation of impulse response